Skip to content

Conversation

@sanderegg
Copy link
Member

@sanderegg sanderegg commented Oct 20, 2025

Why this PR

In a continuous effort to make the osparc leaner, faster to build and/or faster to deploy this is a change in how we use docker buildX (which is already a few years old) to build our containers.
To recall, when we use docker build a docker image is built which is made of "layers". Each of these layers are actually some docker instructions that were executed and compressed and stored. The original, and default compression algorithm uses gzip, which is >20 years old. gzip can be compressed only single-threaded and decompressed multi-threaded if the library pigz is available (which we have on our deployments).

Somewhere in the 2000's Meta developed another compression algorithm called zstd, which allows for multi-threaded compression and decompression. Also from benchmarks around (AWS Fargate) it seems that the performance for decompressing can be up to 50% than the usual gzip. This is where it is interesting for autoscaled machines, especially for cold starts, but also to prepare warm buffers as they would need to be up for a smaller amount of time. Also another good thing is that the size of the images is reduced vs traditional gzip, which means less data to transfer (docker source)

What do these changes do?

  • make build push=true now uses ZSTD compression standard and compression level = 3
  • this currently only has influence on the ARM64 build BECAUSE it is the only build that is currently making use of that command. Note that this should change in the future when I manage to change the building system.
  • the current AMD64 build is still pushed via docker push which always returns to old gzip

Related issue/s

How to test

Dev-ops

@sanderegg sanderegg added this to the Imparable milestone Oct 20, 2025
@sanderegg sanderegg self-assigned this Oct 20, 2025
@sanderegg sanderegg added the t:maintenance Some planned maintenance work label Oct 20, 2025
@codecov
Copy link

codecov bot commented Oct 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.55%. Comparing base (0792d8a) to head (d6c193c).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8535      +/-   ##
==========================================
+ Coverage   87.23%   87.55%   +0.31%     
==========================================
  Files        1935     2012      +77     
  Lines       76477    79025    +2548     
  Branches     1368     1368              
==========================================
+ Hits        66717    69192    +2475     
- Misses       9354     9427      +73     
  Partials      406      406              
Flag Coverage Δ
integrationtests 63.87% <ø> (-0.01%) ⬇️
unittests 86.28% <ø> (+0.35%) ⬆️
Components Coverage Δ
pkg_aws_library 94.98% <ø> (ø)
pkg_celery_library 83.22% <ø> (ø)
pkg_dask_task_models_library 79.37% <ø> (ø)
pkg_models_library 92.90% <ø> (ø)
pkg_notifications_library 85.20% <ø> (ø)
pkg_postgres_database 87.99% <ø> (ø)
pkg_service_integration 72.76% <ø> (ø)
pkg_service_library 71.00% <ø> (ø)
pkg_settings_library 90.29% <ø> (ø)
pkg_simcore_sdk 84.95% <ø> (ø)
agent 93.10% <ø> (ø)
api_server 91.35% <ø> (ø)
autoscaling 95.83% <ø> (ø)
catalog 92.06% <ø> (ø)
clusters_keeper 99.14% <ø> (ø)
dask_sidecar 91.19% <ø> (-0.54%) ⬇️
datcore_adapter 97.95% <ø> (ø)
director 75.72% <ø> (ø)
director_v2 90.90% <ø> (ø)
dynamic_scheduler 96.66% <ø> (∅)
dynamic_sidecar 90.44% <ø> (ø)
efs_guardian 89.83% <ø> (ø)
invitations 90.90% <ø> (ø)
payments 92.80% <ø> (ø)
resource_usage_tracker 92.22% <ø> (+0.10%) ⬆️
storage 86.68% <ø> (+0.12%) ⬆️
webclient ∅ <ø> (∅)
webserver 87.05% <ø> (+0.05%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0792d8a...d6c193c. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mergify
Copy link
Contributor

mergify bot commented Oct 20, 2025

🧪 CI Insights

Here's what we observed from your CI run for d6c193c.

✅ Passed Jobs With Interesting Signals

Pipeline Job Signal Health on master Retries 🔍 CI Insights 📄 Logs
CI integration-tests Base branch is healthy, but retries were needed. Could be early signs of flakiness 👀 Healthy 1 View View
unit-tests Base branch is broken, but retries were needed. Could be early signs of flakiness 👀 Broken 2 View View

@sanderegg sanderegg marked this pull request as ready for review November 11, 2025 16:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR switches Docker image compression from the default gzip to ZSTD with compression level 3 when pushing images to the registry. The change aims to improve compression efficiency during the build and push process.

Key Changes:

  • Modified the Makefile build process to use ZSTD compression with level 3 for registry pushes
  • Updated local build output to use OCI format with ZSTD compression level 9
  • Removed extraneous blank line in docker-compose.yml

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
Makefile Updates build output configuration to use ZSTD compression (level 9 for local, level 3 for registry) and switches to OCI format
services/docker-compose.yml Removes blank line between comment and environment variable definition

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sonarqubecloud
Copy link

Copy link
Member

@mrnicegyu11 mrnicegyu11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure why not 😁 thanks 👍

@YuryHrytsuk
Copy link
Contributor

YuryHrytsuk commented Nov 12, 2025

Thanks!

What is the influence of this change? Shall docker image pull work faster? Are only ARM images affected?

PS I would also explain "why" in the PR's description

Copy link
Member

@pcrespov pcrespov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx

@sanderegg
Copy link
Member Author

Thanks!

What is the influence of this change? Shall docker image pull work faster? Are only ARM images affected?

PS I would also explain "why" in the PR's description

@pcrespov @YuryHrytsuk @mrnicegyu11 some additional infos were added in the PR description. I hope this makes things clearer.

@sanderegg sanderegg enabled auto-merge (squash) November 12, 2025 20:37
@sanderegg sanderegg merged commit b092a86 into ITISFoundation:master Nov 12, 2025
192 of 198 checks passed
@sanderegg sanderegg deleted the docker-use-zstd branch November 12, 2025 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t:maintenance Some planned maintenance work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants